from pydantic import BaseModel, Field
from typing import List

class ConfigModel(BaseModel):
    name: str = Field(description="模型的名称")
    enable: int = Field(description="是否启用")
    mode: str = Field(description="模型类型，如本地或在线模式")
    path: str = Field(description="模型路径，本地时是本地模型文件地址，在线时是模型请求的URL")

class ConfigModelVdb(BaseModel):
    name: str
    enable: int
    host: str
    port: int
    user: str
    password: str
    collection_name: str    

class Models(BaseModel):
    embedding: List[ConfigModel]
    vdbs: List[ConfigModelVdb]
    llms: List[ConfigModel]

class Config(BaseModel):
    models: Models